<template>
	<view class="l_pages">
		<jnavbar title="开通详情"></jnavbar>
		<scroll-view class="page_container tab_page_container" scroll-y>
			<view class="content">
				<view class="content-head">
					<u-icon name="checkmark-circle" style=""></u-icon>
					<view class="title">开通成功</view>
				</view>
				<view class="box">
					<view class="box-item">
						<view class="item-img"></view>
						<view class="item-info">
							<view>
								<view class="item-title">
									开通 VIP{{dataList.new_level}}
								</view>
								<view class="item-ititle">
									{{dataList.source}}
								</view>
							</view>
							<view style="text-align: right;">
								￥{{dataList.money}}
								<view>1</view>
							</view>
						</view>
					</view>
				</view>
				<view class="content-foot">
					<view class="difc">
						<view class="">
							<text>订单编号：</text>{{dataList.trade}}
						</view>
						<view class="btn">
							复制
						</view>
					</view>
					<view><text>创建时间：</text>{{dataList.create_time}}</view>
				</view>
			</view>

		</scroll-view>
	</view>
</template>

<script>
	import http from '@/common/http.js';
	export default {

		data() {
			return {
				dataList: [],
				userLevel: 0
			}
		},
		async onLoad(e) {
			await this.$getWx
			if (e) {
				this.getDataList(e.id)
			}
		},
		methods: {
			getDataList(id) {
				http('/membership/record/' + id, {}, 'get').then(res => {
					this.dataList = res.data.msg
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		background: #fff;

		.content-head {
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 40rpx 0;
			font-size: 42rpx;

			.u-icon {
				margin-right: 10rpx;
				color: #4CD964;
			}

			.title {
				font-size: 32rpx;
			}

		}

		.box {

			padding: 0 20rpx;
			margin-top: 20rpx;

			.box-item {
				display: flex;
				padding: 20rpx 0;
				border-bottom: #e8e8e8 1rpx solid;

				.item-img {
					width: 120rpx;
					height: 120rpx;
					display: block;
					background: #ccc;
					border-radius: 15rpx;
					overflow: hidden;
				}

				.item-info {
					flex: 1;
					padding-left: 20rpx;
					display: flex;
					justify-content: space-between;

					.item-title {
						font-size: 28rpx;
						font-weight: bold;
						color: #333;
					}

					.item-ititle {
						font-size: 24rpx;
						color: #666;
					}
				}

			}


		}

		.content-foot {
			padding: 20rpx;
			font-size: 24rpx;

			.btn {
				border: solid 1rpx #ccc;
				padding: 5rpx 15rpx;
				border-radius: 30rpx;
			}
		}
	}

	.difc {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
</style>
